/*
 * Shandong University — School of Cyber Science and Technology
 * Cryptography Engineering Course (2025)
 *
 * Course Project Contribution
 * Contributor: ShaoYan Zhang, XiaoKai Gong, YiMing Zhou, HeYang Ding
 * Instructor:  Weijia Wang
 *
 * Description:
 *   This code is part of the official output of the 2025 Cryptography Engineering
 *   course at the School of Cyber Science and Technology, Shandong University.
 *   It reflects the project work and research conducted by the contributor(s)
 *   under the supervision of the instructor.
 */

#ifndef HITLS_APP_SPEED_H
#define HITLS_APP_SPEED_H

#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif

#define CIPHER_ALG_PER_LINE 4
#define CRYPT_SUCCESS 0
#define CRYPT_FAILURE 1
#define KB_TO_MB_FACTOR 1024.0
#define USEC_TO_SEC_FACTOR 1000000.0
#define MIN_ELAPSED_THRESHOLD 0.0001
#define IV_LENGTH 16
#define ENCRYPT_EXTRA_BUFFER_LEN 32
#define TEST_BLOCK_SIZES_LEN 6
#define SECONDS              3
#define MAX_KEY_LEN          64
#define MAX_MAC_LEN          128
#define MAX_THREADS          32
#define AES192_KEY_LENGTH 24
#define AES256_KEY_LENGTH 32
#define AES128_KEY_LENGTH 16
#define HMAC_SHA512_KEY_LENGTH 64
#define DEFAULT_HMAC_KEY_LENGTH 32

// Automatic test block size array
static const int TEST_BLOCK_SIZES[TEST_BLOCK_SIZES_LEN] = {16, 64, 256, 1024, 8192, 16384};

// Cipher algorithm list structure
typedef struct {
    const int cipherId;
    const char *cipherAlgName;
} HITLS_CipherList;

// MAC algorithm list structure
typedef struct {
    const int macId;
    const char *macAlgName;
} HITLS_MacList;

// Performance test main function
int32_t HITLS_SpeedMain(int argc, char *argv[]);

#ifdef __cplusplus
}
#endif
#endif
